<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>

</h:head>
<h:body>
	<ui:composition template="../template.xhtml">
		<ui:define name="menu">

			<h:form prependId="false">
				<p:menu id="leftIm">

					<p:submenu label="Area Impiegato">
						<p:menuitem value="Admin" outcome="index" icon="ui-icon-home" />
						<p:menuitem value="Mezzi" outcome="showEditMezzo"
							icon="ui-icon-star" />
						<p:menuitem value="Escursioni" outcome="showEditEscursione"
							icon="ui-icon-star" />
						<p:menuitem value="Alberghi" outcome="showEditAlbergo"
							icon="ui-icon-star" />
						<p:menuitem value="Luoghi" outcome="luoghiLis" icon="ui-icon-star" />
						<p:menuitem value="New Pacchetto" outcome="AddPacchetto"
							icon="ui-icon-star" />
						<p:menuitem value="Logout" action="#{logoutBean.logout()}"
							icon="ui-icon-close" />
					</p:submenu>
				</p:menu>
			</h:form>
		</ui:define>
		<ui:define name="content">
			<h:form id="form">

				

				<p:panel header="Lista Escursioni">
					<h:panelGrid columns="" id="regGrid">
				
				<p:dataTable id="pacchetti" var="car" value="#{showMezzoModBean.carsSmall}" update="regGrid" rowKey="#{car.id}" selection="#{showMezzoModBean.mezzoselect}" selectionMode="single">


					

					<p:column headerText="Id Mezzo" >
						
							#{car.idMezzoTrasporto}
							
					</p:column>

					<p:column headerText="Posti Disponibili" >
						#{car.postiDisponibili}
					</p:column>
					<p:column headerText="Costo Persona" >
						#{car.costoPers}
					</p:column>
					<p:column headerText="Id Partenza" >
						#{car.idLuogoPartenza}
							
					</p:column>

					<p:column headerText="Id Destinazione">
						#{car.idLuogoArrivo}
							
					</p:column>



					<p:column headerText="Data Partenza" >
						#{car.dataInizio}
						
					</p:column>
					<p:column headerText="Data Arrivo" >
					#{car.dataFine}
					</p:column>




					

				</p:dataTable>
				<p:commandButton value="Modifica Selezionato" update="regGrid" icon="ui-icon-search"  action="#{showMezzoModBean.modify()}" />	
				<p:commandButton value="Elimina Selezionato" update="regGrid" icon="ui-icon-search"  action="#{showMezzoModBean.delete()}" />	
				<h:link value="Inserisci nuovo mezzo" outcome="inserimentoViaggio" />
				
				</h:panelGrid>
				</p:panel>

			</h:form>
		</ui:define>
		
			

	</ui:composition>
</h:body>
</html>